//
//  SEGcustomContentViewModel.h
//  Commom
//
//  Created by Clavis on 2019/7/29.
//

#import <Foundation/Foundation.h>
#import "SEGNeighbourViewModel.h"
#import "SEGMarketViewModel.h"
#import "SEGFocusViewModel.h"
#import "SEGTopicTextViewModel.h"
#import "SEGTopicPicViewModel.h"
#import "SEGMarketDetailViewModel.h"
#import "SEGAutoHeightImageViewModel.h"

#define kcustomContentViewHeight 35     // customContentView的高度
#define viewPadding  9//内容和视图之间的间距
#define buttonPadding  10 //按钮上下左右留白 ，加大点击区域

typedef NS_ENUM(NSUInteger, SEGEnumcustomContentViewType) {
    //    SEGEnumcustomContentViewType_NEIGHBOUR_TEXTONLY = 0, /*邻里圈发布文本*/
    SEGEnumcustomContentViewType_FOCUS = 1,/*看点（原PGC）转发*/
    SEGEnumcustomContentViewType_NEIGHBOUR_PHOTOText = 2, /*邻里圈发布图文*/
    SEGEnumcustomContentViewType_MARKET = 3, /*邻里圈集市*/
    SEGEnumcustomContentViewType_TOPIC_PHOTOText = 4, /*话题参与有图文*/
    SEGEnumcustomContentViewType_TOPIC_TEXTONLY = 5, /*话题参与仅文本*/
    SEGEnumcustomContentViewType_LIKE = 6, /*喜欢（原收藏）*/
    SEGEnumcustomContentViewType_MARKETDETAIL = 7 /*集市详情/集市列表*/
};

@interface SEGcustomContentViewModel : NSObject
@property (nonatomic, copy) NSString *contentText; // 主内容/集市标题
@property (nonatomic, copy) NSString *isLike; // 点赞文字
@property (nonatomic, copy) NSString *like; // 点赞文字
@property (nonatomic, copy) NSString *comment; // 评论文字
@property (nonatomic, assign) CGFloat widgetWidth; //空间总宽度
@property (nonatomic, assign) BOOL isNeighborListView; //是否为邻里圈列表界面
@property (nonatomic, assign) BOOL isDetailView; //是否为邻里圈详情界面
@property (nonatomic, assign) BOOL isLiked; //是否已点赞
@property (nonatomic, copy) NSString *helpLabelText; // 互助标签


@property (nonatomic, strong)SEGNeighbourViewModel *NeighbourDataSource; //邻里圈数据源

@property (nonatomic, strong)SEGMarketViewModel *marketDataSource; //集市数据源

@property (nonatomic, strong)SEGFocusViewModel *focusDataSource; //喜欢看点/分享看点 数据源

@property (nonatomic, strong)SEGTopicTextViewModel *topicTextDataSource; //文字话题 数据源

@property (nonatomic, strong)SEGTopicPicViewModel *topicPicDataSource; //图文话题 数据源

@property (nonatomic, strong)SEGMarketDetailViewModel *marketDetailDataSource; //集市详情数据源

@end

@interface SEGcustomContentViewLayout : NSObject
@property (nonatomic, assign,readonly) CGFloat totalHeight;//控件总高度
@property (nonatomic, assign,readonly) CGFloat totalImageWidth;//控件总高度
@property (nonatomic, assign,readonly) CGFloat totalImageHeight;//控件总高度
@property (nonatomic, assign,readonly) SEGEnumcustomContentViewType type;//控件类型
@property (nonatomic, strong,readonly)SEGcustomContentViewModel *data;
- (instancetype)initWithData:(SEGcustomContentViewModel *)data type:(SEGEnumcustomContentViewType)type;
-(void)segcustomContentViewLayout;

@property (nonatomic, assign) CGFloat contentTextLabelHeight;//contentTextLabel 高度
@property (nonatomic, strong) SEGTextLayout *contentTextLabelTextLayout;//contentTextLabel 富文本布局

@property (nonatomic, assign) CGFloat likeLabelHeight;//likeLabel 高度
@property (nonatomic, assign) CGFloat likeLabelWidth;//likeLabel 宽度
@property (nonatomic, strong) SEGTextLayout *likeLabelTextLayout;//likeLabel 富文本布局

@property (nonatomic, assign) CGFloat  commentTopPadding;//评论顶部间距
@property (nonatomic, assign) CGFloat  commentLabelHeight;// commentLabel 高度
@property (nonatomic, assign) CGFloat  commentLabelWidth;// commentLabel 宽度
@property (nonatomic, strong) SEGTextLayout * commentLabelTextLayout;// commentLabel 富文本布局

@property (nonatomic, strong)SEGNeighbourViewLayout *neighbourLayout; //邻里圈布局

@property (nonatomic, strong)SEGMarketViewLayout *marketLayout; //集市布局

@property (nonatomic, strong)SEGFocusViewLayout *focusLayout; //喜欢看点/分享看点 布局


@property (nonatomic, strong)SEGTopicTextViewLayout *topicTextLayout; //文字话题 布局
@property (nonatomic, strong)SEGTopicPicViewLayout *topicPicLayout; //图文话题 布局
@property (nonatomic, strong)SEGMarketDetailViewLayout *marketDetailLayout; //集市详情布局

@end
